<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id = "box">
        {{username + " 222"}}
        {{username.slice(0,1)}}
        {{isLogin?'已登录':'未登录'}}
    </div>
    <script>
      var obj = {
          data(){
              return {
                  username : "lhy",
                  isLogin : true
              }
          }
      }
      var app = Vue.createApp(obj).mount("#box")
    </script>
</body>
</html>